from barrelhouse.core.domains.models import second_level_domain, third_level_domain
from django.contrib import admin

class second_level_domain_admin(admin.ModelAdmin):

    list_display = ('name','registrar','registration_date','expiration_date')
    list_filter = ('expiration_date',)
    ordering = ('-expiration_date',)
    save_on_top = True
    date_heirarchy = 'exiration_date'

class third_level_domain_admin(admin.ModelAdmin):

    list_display = ('name','root_domain', 'registration_date')
    list_filter = ('name',)
    ordering = ('name',)
    save_on_top = True
    date_heirarchy = 'registration_date'

admin.site.register(second_level_domain, second_level_domain_admin)
admin.site.register(third_level_domain, third_level_domain_admin)
